//
//  MyShapeLayerVC.m
//  FrameWork2.0
//
//  Created by jiaming yan on 2016/12/27.
//  Copyright © 2016年 yanjiaming. All rights reserved.
//

#import "MyShapeLayerVC.h"
#import "MyPie.h"
@interface MyShapeLayerVC ()<MyPieDelegate>

@end

@implementation MyShapeLayerVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self myPie];
}
//! 大饼状图
-(void)myPie{
    MyPie *pie=[[MyPie alloc]initWithFrame:CGRectMake(50, 200, 220, 220)];
    [pie.textArray addObjectsFromArray:@[@"我",@"的",@"名",@"字",@"叫",@"王",@"威"]];
    pie.dataArray=@[@.1,@0.2,@0.3,@0.1,@0.1,@0.1,@0.1];
    pie.backgroundColor=[UIColor greenColor];
    pie.delegate=self;
    [self.view addSubview:pie];
}
//! 饼状图的点击事件
-(void)touchTheShapeLayer:(WWShapeLayer *)layer{
    NSLog(@"%@",self.navigationController.childViewControllers);
    MyShapeLayerVC *vc = [[MyShapeLayerVC alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
